<?php
namespace app\index\controller;
use app\index\model\Login_model;
use think\Session;
use think\Controller;
use think\Db;

//首页
class Login extends Controller
{
	public function login()
	{
		return view('login');
	}

	//登陆
	public function login_form()
	{
		$params = input();
        $Goods = new Login_model;
        $sele_sql = $Goods->login($params);
        return $this->redirect('projectnotification/question');   
	}

	//注册
	public function registered()
	{
		return view('registered');
	} 

	public function registered_add()
	{
		$params = input();
        $Goods = new Login_model;
        $registered = $Goods->registered($params);
        return $this->redirect('login/login');   
	} 

	//删除session
	public function session(){
		session('username',null); // 删除name
		session('admin',null); // 删除name
		return $this->redirect('login/login');   
	}
}